package com.onenine.app.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.onenine.app.R;
import com.onenine.app.model.ChatGiftItem;
import com.onenine.app.utils.GlideUtils;
import com.onenine.common.util.ApUtils;

import java.util.List;

public class ChatGiftAdapter extends BaseQuickAdapter<ChatGiftItem, BaseViewHolder> {
    public ChatGiftAdapter(@Nullable List<ChatGiftItem> data) {
        super(R.layout.layout_chat_gift_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ChatGiftItem item) {
        helper.setText(R.id.tv_price, item.getGiftName());
        GlideUtils.loadSrcImage(ApUtils.getApp()
                , helper.getView(R.id.iv_image), item.getIconUrl());
    }
}
